/**
 * 
 */
package net.destroyer.game.tetris.gui.control;

import net.destroyer.game.tetris.core.IEngine;
import net.destroyer.game.tetris.gui.MainWindow;
import net.destroyer.game.tetris.gui.control.interf.IGuiCommand;

/**
 * @author slizavit
 *
 */
public class ExitCommand implements IGuiCommand {

	private IEngine eng;
	private MainWindow w;
	public ExitCommand(IEngine eng,MainWindow w) {
		this.eng = eng;
		this.w = w;
	}
	/* (non-Javadoc)
	 * @see net.destroyer.game.tetris.gui.control.interf.IGuiCommand#execute()
	 */
	@Override
	public void execute() {
		w.dispose();
		System.exit(0);
	}

}
